Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boban/suspense #1886

Closed
wants to merge 43 commits into from
Closed

Boban/suspense #1886

wants to merge 43 commits into from

Conversation

BobanL
Copy link
Collaborator

@BobanL BobanL commented May 22, 2024

PULL REQUEST

General Summary

  • Use "use client" only where necessary, like when we are using browser and interactivity specific functionality. This allows us to default to server side rendering which increase performance.

Explanation of most of the changes.

  • Install jsdom to handle the TableToJson functionality on the server.
  • Install dompurify to clean any potential misconfigured HTML that was passed to us in miscellaneous notes. Since this section is now rendered on the server there are warnings about how invalid HTML is being used and it looked incorrect.
    image (this is fixed with dompurify, just wanted to show the example with it).
  • Fix build to include static assets
  • Fix start to call the standalone server.js that is generated
  • Utilize error.tsx and loading.tsx that are built in to show error and loading states.
  • Move formatTablesToJson to its own file since it should only be used for server side rendering with the use of jsdom.
  • Move metrics into a new component that returns an empty div. This seemed to be the best place to put
  • Remove api calls to fetch data and instead use server actions

Additional Information

Performance on Main:
image
Performance now:
image

React-uswds shows a warning. This change did not introduce this
image

Occasionally, a warning will appear that aria-describedby did not match between the server and the client.
image

Checklist

  • If this code affects the other scrum team, have they been notified? (In Slack, as reviewers, etc.)

BobanL added 30 commits May 13, 2024 09:38
@BobanL BobanL closed this Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant